

$(document).ready(function(){
  $("#submit").click(function(){
    layer.alert("没有风险");
    var threeDividendsSum = $("#threeDividendsSum").val();
    var dividendsYear = $("#dividendsYear").val();
    var totalAssets = $("#totalAssets").val();
    var totalLiability = $("#totalLiability").val();
    var salesRevenue = $("#salesRevenue").val();
    var netProfit = $("#netProfit").val();
    var shareholdersEquity = $("#shareholdersEquity").val();
    var accountsReceivable = $("#accountsReceivable").val();
    var basicEarningsPerShare = $("#basicEarningsPerShare").val();
    var netOperatingCashFlow = $("#netOperatingCashFlow").val();

    $.post("/submit",
        {
            'threeDividendsSum':threeDividendsSum,
            'dividendsYear':dividendsYear,
            'totalAssets':totalAssets,
            'totalLiability':totalLiability,
            'salesRevenue':salesRevenue,
            'netProfit':netProfit,
            'shareholdersEquity':shareholdersEquity,
            'accountsReceivable':accountsReceivable,
            'basicEarningsPerShare':basicEarningsPerShare,
            'netOperatingCashFlow':netOperatingCashFlow
        },
        function(ret){
            if(ret.stat == '1'){
                layer.alert("没有风险");
            }
            else if(ret.stat == '-1'){
                layer.alert("数据错误");
            }
            else{
                layer.alert("存在风险");
            }
        },
        "json");
  });
});